<?php

namespace Common\Event;

use Swoole\Server;
use Swoole\Client;

/**
 * mqtt事件
 */
class SendToMqtt
{
    public string $topic;

    public string $message;

    public int $qos;

    public int $dup;

    public int $retain;

    public array $properties;

    public function __construct(string $topic, string $message, int $qos = 1, int $dup = 0, int $retain = 0, array $properties = [])
    {
        $this->topic = $topic;
        $this->message = $message;
        $this->qos = $qos;
        $this->dup = $dup;
        $this->retain = $retain;
        $this->properties = $properties;
    }
}
